import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: 'login',
    },
    { path: '/home', name: 'home', component: () => import('@/views/home/index.vue') },
    { path: '/login', name: 'login', component: () => import('@/views/login/index.vue') },
    { path: '/register', name: 'register', component: () => import('@/views/register/index.vue') },
    { path: '/class', name: 'class', component: () => import('@/views/class/index.vue') },
  ],
})

export default router
